<style type="text/css">
.compare-details {border: 1px solid #000000;border-right: 0; border-bottom: 0;}
.compare-details .title {font-weight: bold;}
.compare-details td {border: 1px solid #000000; border-top: 0; border-left: 0; padding: 3px;}
.compare-details table td {border: 0}
.compare-details tr.odd {background: none repeat scroll 0 0 #EEEEEE;}
.compare-details tr.title:hover {background: none;}
.compare-details tr:hover {background: none repeat scroll 0 0 #ECFBD4;}
</style>
<table width="100%" class="compare-details" cellpadding="0" cellspacing="0">
    <tr class="title">
        <td colspan="2"><?php echo $pageTitle;?></td>
    </tr>
    <tr class="title">
        <td width="50%" align="center"><?php echo $sourceWorkflow;?></td>
        <td width="50%" align="center"><?php echo $targetWorkflow;?></td>
    </tr>
    <tr class="title">
        <td colspan="2">Template</td>
    </tr>
    <tr>
        <td><?php echo $sourceTemplate;?></td>
        <td><?php echo $targetTemplate;?></td>
    </tr>
<?php foreach ($containers as $container => $data):
if (! array_key_exists('source', $data))
    $data['source'] = array();
if (! array_key_exists('target', $data))
    $data['target'] = array();
$sourceCount = count($data['source']);
$targetCount = count($data['target']);
$count = $sourceCount < $targetCount ? $targetCount : $sourceCount;
?>
    <tr class="title">
        <td colspan="2">
            <?php echo $container;?>
        </td>
    </tr>
    <?php for ($index=0; $index < $count; $index++):?>
        <tr class="widget<?php echo $index%2 ? ' odd' : '';?>">
            <td>
                <?php echo isset($data['source'][$index]) ? $data['source'][$index]->widgetData->name.'('.$data['source'][$index]->widgetLayout->widget->name.' - '.$data['source'][$index]->widgetLayout->widget->typeText.'/'.$data['source'][$index]->widgetLayout->name.')' : ''; ?>
            </td>
            <td>
                <?php echo isset($data['target'][$index]) ? $data['target'][$index]->widgetData->name.'('.$data['target'][$index]->widgetLayout->widget->name.' - '.$data['target'][$index]->widgetLayout->widget->typeText.'/'.$data['target'][$index]->widgetLayout->name.')' : '';?>
            </td>
        </tr>
    <?php endfor;?>
<?php endforeach;?>
</table>